package cn.wolfcode.wolf2w.conteoller;

import cn.wolfcode.wolf2w.domain.SpotDetail;
import cn.wolfcode.wolf2w.service.ISpotDetailService;
import cn.wolfcode.wolf2w.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/spotDetails")
public class SpotDetailController {
    @Autowired
    private ISpotDetailService spotDetailService ;

    @GetMapping("/query")
    public JsonResult query(String id){
        SpotDetail spotDetail = spotDetailService.getDetailBySpotId(id);
        System.out.println(spotDetail);
        return JsonResult.success(spotDetail);
    }
}

